﻿@model IEnumerable<DiyBook.Models.Book>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            ISBN
        </th>
        <th>
            bookName
        </th>
        <th>
            publishNum
        </th>
        <th>
            contents
        </th>
        <th>
            publisher
        </th>
        <th>
            authors
        </th>
        <th>
            count
        </th>
        <th>
            bookImg
        </th>
        <th>
            classType1
        </th>
        <th>
            classType2
        </th>
        <th>
            classType3
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.ISBN)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.bookName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.publishNum)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.contents)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.publisher)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.authors)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.count)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.bookImg)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.classType1)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.classType2)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.classType3)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.bookId }) |
            @Html.ActionLink("Details", "Details", new { id=item.bookId }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.bookId })
        </td>
    </tr>
}

</table>
